using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._SpatialAnalystTools._Neighborhood
{
    /// <summary>
    /// <para>Focal Flow</para>
    /// <para>Determines the flow of the values in the input raster within each cell's immediate neighborhood.</para>
    /// <para>确定每个像元的邻近区域内输入栅格中值的流。</para>
    /// </summary>    
    [DisplayName("Focal Flow")]
    public class FocalFlow : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public FocalFlow()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_surface_raster">
        /// <para>Input surface raster</para>
        /// <para><xdoc>
        ///   <para>The input surface raster for which to calculate the focal flow.</para>
        ///   <para>The eight immediate neighbors of each cell are evaluated to determine the flow.</para>
        ///   <para>The input raster can be integer or floating point.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>用于计算焦点流的输入表面栅格。</para>
        ///   <para>评估每个像元的八个近邻单元以确定流。</para>
        ///   <para>输入栅格可以是整数或浮点。</para>
        /// </xdoc></para>
        /// </param>
        /// <param name="_out_raster">
        /// <para>Output raster</para>
        /// <para><xdoc>
        ///   <para>The output focal flow raster.</para>
        ///   <para>The output raster is always of integer type.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>输出焦点流栅格。</para>
        ///   <para>输出栅格始终为整数类型。</para>
        /// </xdoc></para>
        /// </param>
        public FocalFlow(object _in_surface_raster, object _out_raster)
        {
            this._in_surface_raster = _in_surface_raster;
            this._out_raster = _out_raster;
        }
        public override string ToolboxName => "Spatial Analyst Tools";

        public override string ToolName => "Focal Flow";

        public override string CallName => "sa.FocalFlow";

        public override List<string> AcceptEnvironments => ["autoCommit", "cellSize", "cellSizeProjectionMethod", "compression", "configKeyword", "extent", "geographicTransformations", "mask", "outputCoordinateSystem", "scratchWorkspace", "snapRaster", "tileSize", "workspace"];

        public override object[] ParameterInfo => [_in_surface_raster, _out_raster, _threshold_value];

        /// <summary>
        /// <para>Input surface raster</para>
        /// <para><xdoc>
        ///   <para>The input surface raster for which to calculate the focal flow.</para>
        ///   <para>The eight immediate neighbors of each cell are evaluated to determine the flow.</para>
        ///   <para>The input raster can be integer or floating point.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>用于计算焦点流的输入表面栅格。</para>
        ///   <para>评估每个像元的八个近邻单元以确定流。</para>
        ///   <para>输入栅格可以是整数或浮点。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input surface raster")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_surface_raster { get; set; }


        /// <summary>
        /// <para>Output raster</para>
        /// <para><xdoc>
        ///   <para>The output focal flow raster.</para>
        ///   <para>The output raster is always of integer type.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>输出焦点流栅格。</para>
        ///   <para>输出栅格始终为整数类型。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output raster")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_raster { get; set; }


        /// <summary>
        /// <para>Threshold value</para>
        /// <para><xdoc>
        ///   <para>Defines a value that constitutes the threshold, which must be equaled or exceeded before flow can occur.</para>
        ///   <para>The threshold value can be either an integer or floating-point value.</para>
        ///   <para>If the difference between the value at a neighboring cell location and the value of the processing cell is less than or equal to the threshold value, the output will be 0 (or no flow).</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>定义构成阈值的值，该阈值必须等于或超过阈值，然后才能发生流。</para>
        ///   <para>阈值可以是整数值，也可以是浮点值。</para>
        ///   <para>如果相邻像元位置的值与处理像元的值之间的差值小于或等于阈值，则输出将为 0（或无流量）。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Threshold value")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double _threshold_value { get; set; } = 0;


        public FocalFlow SetEnv(int? autoCommit = null, object cellSize = null, object compression = null, object configKeyword = null, object extent = null, object geographicTransformations = null, object mask = null, object outputCoordinateSystem = null, object scratchWorkspace = null, object snapRaster = null, double[] tileSize = null, object workspace = null)
        {
            base.SetEnv(autoCommit: autoCommit, cellSize: cellSize, compression: compression, configKeyword: configKeyword, extent: extent, geographicTransformations: geographicTransformations, mask: mask, outputCoordinateSystem: outputCoordinateSystem, scratchWorkspace: scratchWorkspace, snapRaster: snapRaster, tileSize: tileSize, workspace: workspace);
            return this;
        }

    }

}